<?php
namespace app\index\command;

use think\console\Command;
use think\console\Input;
use think\console\Output;

class Deduction extends Command
{
    protected function configure()
    {
        $this->setName('deduction')->setDescription('Here is the remark ');
    }

    protected function execute(Input $input, Output $output)
    {
        $output->writeln('Date Crontab job start...');
        /*** 这里写计划任务列表集 START ***/

        $this->toDeduction();

        /*** 这里写计划任务列表集 END ***/
        $output->writeln('Date Crontab job end...');
    }
    private function toDeduction(){
        while(true){
            echo 'to make job .....';
            sleep(5);
            $deduction=model('index/Deduction');
            $deduction->getTodayServiceList();
            $this->toDeduction();
        }
    }

}